using UnityEngine;

public class ExitController : MonoBehaviour {

    void OnTriggerEnter2D(Collider2D collider) {
        if(collider.CompareTag("Player")) 
            Invoke();
    }

    void Invoke() {
        LevelManager.Current.LoadNextLevel();
    }
}